package cn.wizzer.app.sys.modules.models;


import cn.wizzer.framework.base.model.BaseModel;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;
import org.nutz.dao.interceptor.annotation.PrevInsert;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 币种
 */
@Data
@Table("sys_currency")
public class SysCurrency extends BaseModel implements Serializable {

    @Column
    @Name
    @Comment("ID")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    @PrevInsert(uu32 = true)
    private String id;

    @Column
    @Comment("币种名称")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String name;

    @Column
    @Comment("备注")
    @ColDefine(type = ColType.VARCHAR, width = 64)
    private String remark;

    @Column
    @Comment("汇率 currentCurrency:default")
    @ColDefine(type = ColType.FLOAT, width = 16,precision = 6)
    private BigDecimal rate;

    @Column
    @Comment("logo/国旗")
    @ColDefine(type = ColType.VARCHAR, width = 256)
    private String logo;

    @Column
    @Comment("国家")
    @ColDefine(type = ColType.VARCHAR, width = 32)
    private String country;

    @Column
    @Comment("排列序号")
    @ColDefine(type = ColType.INT, width = 4)
    private int sort;

    @Column
    @Comment("允许此类型币充值")
    @ColDefine(type = ColType.BOOLEAN)
    @Default("true")
    private Boolean rechargeEnable;

    @Column
    @Comment("允许此类型币提现")
    @ColDefine(type = ColType.BOOLEAN)
    @Default("true")
    private Boolean cashEnable;

    @Column
    @Comment("是否为数字货币（充值通道需要选择)")
    @ColDefine(type = ColType.BOOLEAN)
    @Default("false")
    private Boolean digital;

    @Column
    @Comment("是否禁用0否1是")
    @ColDefine(type = ColType.BOOLEAN)
    private boolean disabled;
}
